# Maintainer: Affe Null <affenull2345@gmail.com>
pkgname=alarmwakeup
pkgver=0.2.1
pkgrel=0
pkgdesc="RTC alarm management daemon"
url="https://git.abscue.de/obp/alarmwakeup"
arch="all"
license="GPL-3.0-or-later"
pkggroups="rtc"
makedepends="
	linux-headers
	"
subpackages="
	$pkgname-dbg
	$pkgname-dev
	$pkgname-libs
	$pkgname-utils
	"
source="
	https://git.abscue.de/obp/alarmwakeup/-/archive/v$pkgver/alarmwakeup-v$pkgver.tar.gz
	"
options="!check suid" # no tests available
builddir="$srcdir/alarmwakeup-v$pkgver"

build() {
	make
}

package() {
	DESTDIR="$pkgdir" make install
	# limit access to "rtc" group
	chgrp rtc "$pkgdir/usr/bin/alarm-wakeup-daemon"
	chmod 4750 "$pkgdir/usr/bin/alarm-wakeup-daemon"
}

utils() {
	pkgdesc="$pkgdesc (command line utilities)"
	amove usr/bin/alarm-wakeup-ctl
}

sha512sums="
070308f3bf6ab6c57102663341ba4b2456bc6dd6f0e6bcf459b7fdd43e29e610447f4c4c75e188731e4ed9d5d2ce02b6d9b33236d06cfcca47b3b594fce03283  alarmwakeup-v0.2.1.tar.gz
"
